using NHibernate;

namespace Project.Library.NHibernate
{
    public interface IActiveSessionManager
    {
        /// <summary>
        /// Gets the active session of the current Thread.
        /// </summary>
        /// <returns></returns>
        ISession GetActiveSession();

        /// <summary>
        /// Sets the active session for the current Thread.
        /// </summary>
        /// <param name="session">The session.</param>
        void SetActiveSession(ISession session);

        /// <summary>
        /// Clears the active session of the current Tread.
        /// </summary>
        void ClearActiveSession();
    }
}